<template>
	<div class="inspection">
    <div class="information-item equipment-item inspection-item">
      <img  class="information-item-leftImg" src="../../assets/img/securityCheckImg/titledecoration.png" alt="">
      <div class="information-item-title">表具信息</div>
    </div>
    <div class="information-item">
      <div class="information-item-title">出场编号</div>
      <popup-picker class="information-item-input" :data="list1" v-model="value1" @on-change="onChange" placeholder="请选择"></popup-picker>
      <img  class="information-item-rightImg" src="../../assets/img/securityCheckImg/rightArrow.png" alt="">
    </div>
    <div class="information-item">
      <div class="information-item-title">上次示数</div>
      <input class="information-item-input" type="text" maxlength="16" placeholder="请录入" value="890">
    </div>
    <div class="information-item">
      <div class="information-item-title">本次示数</div>
      <input class="information-item-input" type="text" maxlength="16" placeholder="请录入" value="">
      <img class="information-item-icon" src="../../assets/img/securityCheckImg/sao.png" alt="">
    </div>
    <div class="information-item">
      <div class="information-item-title">上次维修日期</div>
      <input class="information-item-input" type="text" maxlength="16" placeholder="请录入" value="890">
    </div>
    <div class="information-item">
      <div class="information-item-title">上次维修内容</div>
      <input class="information-item-input" type="text" maxlength="16" placeholder="请录入" value="890">
    </div>
    <div class="information-item equipment-item inspection-item">
      <img  class="information-item-leftImg" src="../../assets/img/securityCheckImg/titledecoration.png" alt="">
      <div class="information-item-title">巡检内容</div>
    </div>

    <div class="information-item" v-for="(item, index) in inspectionP_CODE" :key="index">
      <div class="information-item-title" data-value="item.CODE_VALUE">{{item.CODE_NAME}}</div>
      <input class="information-item-input" type="text" v-model="item.INPUT_VALUE" maxlength="16" placeholder="请录入" value="">
    </div>

    <div class="information-item equipment-item inspection-item">
      <img  class="information-item-leftImg" src="../../assets/img/securityCheckImg/titledecoration.png" alt="">
      <div class="information-item-title">铅封核对</div>
      <img class="information-item-icon inspection-item-icon" src="../../assets/img/securityCheckImg/add.png" alt="">
    </div>
    <div class="information-item inspection-popupPicker">
      <div class="popupPicker-item">
        <popup-picker class="popupPicker-item-popup" :data="list1" v-model="value1" @on-change="onChange" placeholder="请选择"></popup-picker>
        <!-- <img class="popupPicker-item-icon" src="../../assets/img/securityCheckImg/selectB.png" alt=""> -->
      </div>
      <input class="popupPicker-item-input" type="text" maxlength="16" placeholder="请录入" value="">
      <div class="popupPicker-item-image">
        <img class="popupPicker-item-saoIcon" src="../../assets/img/securityCheckImg/sao.png" alt="">
      <img class="popupPicker-item-delIcon" src="../../assets/img/securityCheckImg/deleteData.png" alt="">
      </div>
    </div>
    <div class="information-item inspection-popupPicker">
      <div class="popupPicker-item">
        <popup-picker class="popupPicker-item-popup" :data="list1" v-model="value1" @on-change="onChange" placeholder="请选择"></popup-picker>
        <!-- <img class="popupPicker-item-icon" src="../../assets/img/securityCheckImg/selectB.png" alt=""> -->
      </div>
      <input class="popupPicker-item-input" type="text" maxlength="16" placeholder="请录入" value="">
      <div class="popupPicker-item-image">
        <img class="popupPicker-item-saoIcon" src="../../assets/img/securityCheckImg/sao.png" alt="">
      <img class="popupPicker-item-delIcon" src="../../assets/img/securityCheckImg/deleteData.png" alt="">
      </div>
    </div>
    <div class="information-item inspection-popupPicker">
      <div class="popupPicker-item">
        <popup-picker class="popupPicker-item-popup" :data="list1" v-model="value1" @on-change="onChange" placeholder="请选择"></popup-picker>
        <!-- <img class="popupPicker-item-icon" src="../../assets/img/securityCheckImg/selectB.png" alt=""> -->
      </div>
      <input class="popupPicker-item-input" type="text" maxlength="16" placeholder="请录入" value="">
      <div class="popupPicker-item-image">
        <img class="popupPicker-item-saoIcon" src="../../assets/img/securityCheckImg/sao.png" alt="">
      <img class="popupPicker-item-delIcon" src="../../assets/img/securityCheckImg/deleteData.png" alt="">
      </div>
    </div>
    <div class="information-item inspection-popupPicker">
      <div class="popupPicker-item">
        <popup-picker class="popupPicker-item-popup" :data="list1" v-model="value1" @on-change="onChange" placeholder="请选择"></popup-picker>
        <!-- <img class="popupPicker-item-icon" src="../../assets/img/securityCheckImg/selectB.png" alt=""> -->
      </div>
      <input class="popupPicker-item-input" type="text" maxlength="16" placeholder="请录入" value="">
      <div class="popupPicker-item-image">
        <img class="popupPicker-item-saoIcon" src="../../assets/img/securityCheckImg/sao.png" alt="">
      <img class="popupPicker-item-delIcon" src="../../assets/img/securityCheckImg/deleteData.png" alt="">
      </div>
    </div>
    <div class="information-item inspection-popupPicker">
      <div class="popupPicker-item">
        <popup-picker class="popupPicker-item-popup" :data="list1" v-model="value1" @on-change="onChange" placeholder="请选择"></popup-picker>
        <!-- <img class="popupPicker-item-icon" src="../../assets/img/securityCheckImg/selectB.png" alt=""> -->
      </div>
      <input class="popupPicker-item-input" type="text" maxlength="16" placeholder="请录入" value="">
      <div class="popupPicker-item-image">
        <img class="popupPicker-item-saoIcon" src="../../assets/img/securityCheckImg/sao.png" alt="">
      <img class="popupPicker-item-delIcon" src="../../assets/img/securityCheckImg/deleteData.png" alt="">
      </div>
    </div>
    <div class="information-item equipment-item inspection-item">
      <img  class="information-item-leftImg" src="../../assets/img/securityCheckImg/titledecoration.png" alt="">
      <div class="information-item-title">巡检结果</div>
    </div>
    <div class="information-item">
      <div class="information-item-radio information-item-input inspection-item-radio">
        <label class="information-item-radio-y">
          <input type="radio" name="radio1" value="0" @change="bindRadio">
          <img class="information-item-radio-icon" src="../../assets/img/securityCheckImg/unselected.png" alt="" v-if="radioShowY">
          <img class="information-item-radio-icon" src="../../assets/img/securityCheckImg/selected.png" alt="" v-else>
          <div class="information-item-radio-text">正常</div>
        </label>
        <label class="information-item-radio-n">
          <input type="radio" name="radio1" value="1" @change="bindRadio">
          <img class="information-item-radio-icon" src="../../assets/img/securityCheckImg/unselected.png" alt="" v-if="radioShowN">
          <img class="information-item-radio-icon" src="../../assets/img/securityCheckImg/selected.png" alt="" v-else>
          <div class="information-item-radio-text">异常</div>
        </label>
      </div>
    </div>
    <div class="entryRecord-item">
      <div class="information-item-title entryRecord-title">存在问题</div>
      <textarea class="information-item-textarea" name="" id="" placeholder="请录入"></textarea>
    </div>
    <div class="entryRecord-item">
      <div class="information-item-title entryRecord-title">维护内容</div>
      <textarea class="information-item-textarea" name="" id="" placeholder="请录入"></textarea>
    </div>
    <div class="entryRecord-item">
      <div class="information-item-title entryRecord-title">巡检建议</div>
      <textarea class="information-item-textarea" name="" id="" placeholder="请录入"></textarea>
    </div>
	</div>
</template>

<script>
import { PopupPicker } from "vux";
import Vue from "vue";
export default {
  data() {
    return {
      value1: ["居民"],
      title1: "手机机型",
      list1: [
        ["小米1", "iPhone1", "华为1", "情怀1", "三星1", "其他1", "不告诉你1"]
      ],
      radioShowY: false,
      radioShowN: true,
      inspectionP_CODE: null
    };
  },
  components: {
    PopupPicker
  },
  props: [],
  mounted() {
    //this.init();
  },
  watch: {},
  methods: {
    bindRadio(e) {
      console.log(e.target.value);
      if (e.target.value == 1) {
        Vue.set(this, "radioShowY", true);
        Vue.set(this, "radioShowN", false);
      } else {
        Vue.set(this, "radioShowY", false);
        Vue.set(this, "radioShowN", true);
      }
    },
    onChange(val) {
      console.log("val change", val);
    }
  },
  mounted() {
    const _this = this;
    // 证件类型
    AndroidApi.queryTableData(
      '{"whereClause":"select * from P_CODE where code_type= ?","whereArgs":["mdmInspConfig"]}',
      function(msg) {
        if (msg.resultCode === "9999") {
          console.log(123123, msg);
          const data = msg.result.map(item => {
            return {
              CODE_NAME: item.CODE_NAME,
              CODE_VALUE: item.CODE_VALUE,
              INPUT_VALUE: ""
            };
          });
          Vue.set(_this, "inspectionP_CODE", data);
        }
      }
    );
  }
};
</script>

<style scoped lang="less">
@import "../../assets/less/style.less";
</style>
<style>
@import "../../assets/less/vuxStyle.less";
</style>
